import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Activador here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Activador extends Item
{
 //   private int resistance;
 ///   private Mensaje mensaje;
    private boolean activated;
    private int band;
    /**
     * Act - do whatever the Activador wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    private Heroe heroe=new Heroe(3);
    
    public Activador()
    {
        super();
        activated=false;
        band=0;
    }

    
     public void addedToWorld(World world)
     {
       getWorld().addObject(mensaje,this.getX(),this.getY()-20);
    }
    
    public void setActivador()
    {
     setImage("beeperGreen.png");
   //  setLocation(getX(),getY()+5);
    activated=true;    
    }
    
    public boolean getActivated()
    {
        return activated;
    }
    

    public boolean fin()
    {
        if(resistance==0)
            return true;
        else
            return false;
    }
}
